<?php /* Smarty version 2.6.13, created on 2008-10-22 11:59:15
         compiled from group_edit.tpl */ ?>
<FORM method="post" action="/backend/usergroups/save/">
<div class="form">
    <H1>Группы пользователей</H1>
    <div class="operation"><a href="<?php echo $this->_tpl_vars['fvConfig']->get('dir_web_root'); ?>
usergroups/" onclick="go('<?php echo $this->_tpl_vars['fvConfig']->get('dir_web_root'); ?>
usergroups/'); return false;" class="left">вернутся к списку</a><div style="clear: both;"></div></div>
<div style="width: 50%; float: left;">

    <label for="group_name">Название</label> <input type="text" id="group_name" name="mg[group_name]" value="<?php echo $this->_tpl_vars['UserGroup']->group_name; ?>
" /><br/>
    <label for="info">Описание</label> <textarea rows="3" id="info" name="mg[info]"><?php echo $this->_tpl_vars['UserGroup']->info; ?>
</textarea><br clear="all">
    <div class="buttonpanel">
        <input type="submit" name="save" value="Сохранить" class="button"  onclick="$('redirect').value = '';">
        <input type="submit" name="save_and_return" value="Сохранить и выйти" class="button" onclick="$('redirect').value = '1';">
    </div>
    <input type="hidden" name="id" id="id" value="<?php echo $this->_tpl_vars['UserGroup']->getPk(); ?>
" />
    <input type="hidden" id="redirect" name="redirect" value="" />
</div>
<div style="float: left; width: 40%; margin-left: 10px;">
    <H2>Права доступа группы</H2>

        <div style="" id="parameters_list">
    <ul class="acls">
<?php $_from = $this->_tpl_vars['fvConfig']->get('acls'); if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['acl_name'] => $this->_tpl_vars['acl']):
?>

    <?php if (is_array ( $this->_tpl_vars['acl'] )): ?> 
        <li> 
        <input type="checkbox" name="" value="" id="mg_permitions_<?php echo $this->_tpl_vars['acl_name']; ?>
" <?php echo 'onclick="$$(\'#content div.form ul.acls li input#mg_permitions_';  echo $this->_tpl_vars['acl_name'];  echo ' + label + ul > li > input\').each(function (el) {el.checked = $(\'mg_permitions_';  echo $this->_tpl_vars['acl_name'];  echo '\').checked});"'; ?>
>
        <label for="mg_permitions_<?php echo $this->_tpl_vars['acl_name']; ?>
" class="checkbox"><?php echo $this->_tpl_vars['acl']['name']; ?>
</label>
        <ul class="acls">
        <?php $_from = $this->_tpl_vars['acl']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['acl_chld_name'] => $this->_tpl_vars['acl_chld']):
?>
            <?php if ($this->_tpl_vars['acl_chld_name'] != 'name'): ?>
                <li><input type="checkbox" name="mg[permitions][]" value="<?php echo $this->_tpl_vars['acl_chld_name']; ?>
" id="mg_permitions_<?php echo $this->_tpl_vars['acl_name']; ?>
_<?php echo $this->_tpl_vars['acl_chld_name']; ?>
" <?php if (in_array ( $this->_tpl_vars['acl_chld_name'] , $this->_tpl_vars['UserGroup']->permitions )): ?>checked="true"<?php endif; ?> onchange="$('mg_permitions_<?php echo $this->_tpl_vars['acl_name']; ?>
').checked = false;">
                <label for="mg_permitions_<?php echo $this->_tpl_vars['acl_name']; ?>
_<?php echo $this->_tpl_vars['acl_chld_name']; ?>
" class="checkbox"><?php echo $this->_tpl_vars['acl_chld']; ?>
</label></li>
            <?php endif; ?>
        <?php endforeach; endif; unset($_from); ?>
        </ul>
        </li>
    <?php else: ?>
        <li><input type="checkbox" name="mg[permitions][]" value="<?php echo $this->_tpl_vars['acl_name']; ?>
" id="mg_permitions_<?php echo $this->_tpl_vars['acl_name']; ?>
" <?php if (in_array ( $this->_tpl_vars['acl_name'] , $this->_tpl_vars['UserGroup']->permitions )): ?>checked="true"<?php endif; ?>>
        <label for="mg_permitions_<?php echo $this->_tpl_vars['acl_name']; ?>
" class="checkbox"><?php echo $this->_tpl_vars['acl']; ?>
</label></li>
    <?php endif;  endforeach; endif; unset($_from); ?>
</ul>
</div>


</div>
<div style="clear: both;" />
</div>


</FORM>